<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateBankCardsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('c_bank_cards', function (Blueprint $table) {
            $table->increments('id');
            $table->string('open_bank',100)->default(null)->comment('开户行');
            $table->string('province',100)->default(null)->comment('开户行省份');
            $table->string('city',100)->default(null)->comment('开户行市');
            $table->string('branch',100)->default(null)->comment('开户行支行');
            $table->string('card_num',25)->default(null)->comment('卡号');
            $table->string('card_name',50)->default(null)->comment('卡姓名');
            $table->integer('card_type')->default(null)->comment('类型1对私账号2对公账号');
            $table->integer('user_id')->default(null)->comment('用户id');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('c_bank_cards');
    }
}
